跳到主要内容

GetActiveCell

Returns an object that represents an active cell.

Syntax

expression.GetActiveCell();

expression - A variable that represents a ApiWorksheet class.

Parameters

This method doesn't have any parameters.

Returns

ApiRange

Example

This example shows how to get an object that represents an active cell.

var oWorksheet = Api.GetActiveSheet();
var oActiveCell = oWorksheet.GetActiveCell();
oActiveCell.SetValue("This sample text was placed in an active cell.");